import React from 'react'
import { useHistory } from 'react-router'
import './goback.less'

export default function GoBack() {
    const history = useHistory()
    const goBack=()=>{
        history.go(-1)
        localStorage.removeItem('liIndex') 
    }
    return (
        <div className="go-back" onClick={goBack}>
            返回上一页
        </div>
    )
}
